Skip to content

Conversation

@HabenFoto
Copy link

I would have liked to do the permutation exercise in a more efficient way.

Copy link

@CheezItMan CheezItMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outstanding work, you hit all the learning goals here. Well done.

Take a look at my comments and let me know if you have any questions.

Comment on lines +1 to +4
#Design and implement a method that takes two integer arrays with unique
#values and returns their intersection in a new array.

def intersection(array1, array2)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines +2 to +5
# Write a method which takes a string as an argument and returns
# true if the letters could be re-arranged into a palindrome.

def palindrome_permutation?(string)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

# Write a method which will take two strings as arguments
# and returns true if one string is a permutation of the other.

def permutations?(string1, string2)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 This works!

Just a note, you're repeating things a few times here, maybe a helper method?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants